package com.ry.demo.concurrent.demo.threadpool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Author: lihui
 * @Date: 2021-12-28 09:17
 * @Description:
 */
public class FixedDemo {

    public static void main(String[] args) {


        new FixedDemo().a();

        ExecutorService executorService = Executors.newFixedThreadPool(3);

        for (int i = 0; i < 6; i++) {
            executorService.execute(new Runnable() {
                @Override
                public void run() {
                    System.out.println("执行了" + Thread.currentThread().getName());
                }
            });
        }

    }


    public boolean a(){

        retry:
        for (;;) {

            for (;;) {
                if (false){
                    System.out.println("支付返回");
                    return false;
                }
                if (true){
                    System.out.println("sss");
                    break retry;
                }
                return false;
            }
        }

        System.out.println("往下执行");

        return true;
    }

}
